﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Data;

namespace Win8nl.Converters
{
  public class AppButtonConverter : IValueConverter
  {
    public object Convert(object value, Type targetType, object parameter, string language)
    {
      var result = false;
      var parm = (string) parameter;
      var val = (int) value;
      if( parm == "help")
      {
       result =  val == 0;
      }
      if( parm == "highscores")
      {
        result = val == 1;
      }
      return result ? Visibility.Visible : Visibility.Collapsed;
    }

    public object ConvertBack(object value, Type targetType, object parameter, string language)
    {
      throw new NotImplementedException();
    }
  }
}
